package com.dwms.feign.goods;

import com.dwms.entity.PageResponse;
import com.dwms.entity.QueryRequest;
import com.dwms.entity.Result;
import com.dwms.entity.base.brand.request.BrandQueryRequest;
import com.dwms.entity.base.brand.request.BrandRequest;
import com.dwms.entity.base.brand.response.BrandResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @ClassName: BrandController
 * @Description: Brand
 * @Create 2025-08-27 14:39:43
 * @Author WH
 * @Since 1.0.0
**/
@FeignClient(value = "base-server", path = "/brand")
public interface BrandFeignClient {


    /**
     * 保存
     *
     * @param brandRequest
     *          请求参数
     * @return
     */
    @PostMapping("/save")
    Result save(@RequestBody BrandRequest brandRequest);

    /**
     * 修改
     *
     * @param brandRequest
     *          请求参数
     * @return
     */
    @PostMapping("/update")
    Result update(@RequestBody BrandRequest brandRequest);
    

    /**
     * 分页查询
     *
     * @param query
     *          查询参数
     * @return
     */
    @PostMapping("/findPage")
    Result<PageResponse<BrandResponse>> findPage(@RequestBody BrandQueryRequest query);

    /**
     *  根据ID查询
     *
     * @param query
     *          参数
     * @return
     */
    @PostMapping("/findById")
    Result findById(@RequestBody QueryRequest query);

    /**
     * 删除
     *
     * @param query
     *          ID
     * @return
     */
    @PostMapping("/delete")
    Result delete(@RequestBody QueryRequest query);

    /**
     * 查询列表
     * @param query
     * @return
     */
    @PostMapping("/findList")
    Result<List<BrandResponse>> findList(@RequestBody BrandQueryRequest query);
}
